using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._ConversionTools._LAS
{
    /// <summary>
    /// <para>Convert LAS</para>
    /// <para>Converts LAS format files between different compression methods, file versions,  and  point record formats.</para>
    /// <para>在不同的压缩方法、文件版本和点记录格式之间转换 LAS 格式文件。</para>
    /// </summary>    
    [DisplayName("Convert LAS")]
    public class ConvertLas : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public ConvertLas()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_in_las">
        /// <para>Input LAS</para>
        /// <para>The LAS data that will be converted. A folder can be specified to process all of the .las files contained therein.</para>
        /// <para>将转换的 LAS 数据。可以指定一个文件夹来处理其中包含的所有 .las 文件。</para>
        /// </param>
        /// <param name="_target_folder">
        /// <para>Target Folder</para>
        /// <para>The existing folder to which the output .las files will be written.</para>
        /// <para>输出 .las 文件将写入到的现有文件夹。</para>
        /// </param>
        public ConvertLas(object _in_las, object _target_folder)
        {
            this._in_las = _in_las;
            this._target_folder = _target_folder;
        }
        public override string ToolboxName => "Conversion Tools";

        public override string ToolName => "Convert LAS";

        public override string CallName => "conversion.ConvertLas";

        public override List<string> AcceptEnvironments => ["scratchWorkspace", "workspace"];

        public override object[] ParameterInfo => [_in_las, _target_folder, _file_version.GetGPValue(), _point_format.GetGPValue(), _compression.GetGPValue(), _las_options, _out_las_dataset, _define_coordinate_system.GetGPValue(), _in_coordinate_system];

        /// <summary>
        /// <para>Input LAS</para>
        /// <para>The LAS data that will be converted. A folder can be specified to process all of the .las files contained therein.</para>
        /// <para>将转换的 LAS 数据。可以指定一个文件夹来处理其中包含的所有 .las 文件。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input LAS")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _in_las { get; set; }


        /// <summary>
        /// <para>Target Folder</para>
        /// <para>The existing folder to which the output .las files will be written.</para>
        /// <para>输出 .las 文件将写入到的现有文件夹。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Target Folder")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _target_folder { get; set; }


        /// <summary>
        /// <para>File Version</para>
        /// <para><xdoc>
        ///   <para>The LAS format file version of the output files.</para>
        ///   <bulletList>
        ///     <bullet_item>Same As Input—The output file version will be the same as the input. This is the default.</bullet_item><para/>
        ///     <bullet_item>1.0—The base version for the LAS format that supported 256 class codes.</bullet_item><para/>
        ///     <bullet_item>1.1—The output file version will be 1.1. Class codes were reduced to 32, but support for classification flags was added.</bullet_item><para/>
        ///     <bullet_item>1.2—The output file version will be 1.2. Support for red-green-blue (RGB) color channels and GPS time was added.</bullet_item><para/>
        ///     <bullet_item>1.3—The output file version will be 1.3. Storage of lidar waveform data for point record formats that are not supported in the ArcGIS platform was added.</bullet_item><para/>
        ///     <bullet_item>1.4— The output file version will be 1.4. Support for coordinate system definition using Well Known Text (WKT) convention, 256 class codes, up to 15 discrete returns per pulse, higher precision scan angle, and overlap classification flag was added.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>输出文件的 LAS 格式文件版本。</para>
        ///   <bulletList>
        ///     <bullet_item>与输入相同 - 输出文件版本将与输入相同。这是默认设置。</bullet_item><para/>
        ///     <bullet_item>1.0 - 支持 256 类代码的 LAS 格式的基本版本。</bullet_item><para/>
        ///     <bullet_item>1.1 - 输出文件版本将为 1.1。类代码减少到 32 个，但添加了对分类标志的支持。</bullet_item><para/>
        ///     <bullet_item>1.2 - 输出文件版本将为 1.2。添加了对红-绿-蓝 （RGB） 颜色通道和 GPS 时间的支持。</bullet_item><para/>
        ///     <bullet_item>1.3 - 输出文件版本将为 1.3。添加了 ArcGIS 平台不支持的点记录格式的激光雷达波形数据存储。</bullet_item><para/>
        ///     <bullet_item>1.4— 输出文件版本将为 1.4。添加了使用已知文本 （WKT） 约定、256 个类代码、每个脉冲最多 15 个离散返回、更高精度的扫描角度和重叠分类标志支持坐标系定义。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("File Version")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _file_version_value _file_version { get; set; } = _file_version_value._SAME_AS_INPUT;

        public enum _file_version_value
        {
            /// <summary>
            /// <para>Same As Input</para>
            /// <para>Same As Input—The output file version will be the same as the input. This is the default.</para>
            /// <para>与输入相同 - 输出文件版本将与输入相同。这是默认设置。</para>
            /// </summary>
            [Description("Same As Input")]
            [GPEnumValue("SAME_AS_INPUT")]
            _SAME_AS_INPUT,

            /// <summary>
            /// <para>1.0</para>
            /// <para>1.0—The base version for the LAS format that supported 256 class codes.</para>
            /// <para>1.0 - 支持 256 类代码的 LAS 格式的基本版本。</para>
            /// </summary>
            [Description("1.0")]
            [GPEnumValue("1.0")]
            value1,

            /// <summary>
            /// <para>1.1</para>
            /// <para>1.1—The output file version will be 1.1. Class codes were reduced to 32, but support for classification flags was added.</para>
            /// <para>1.1 - 输出文件版本将为 1.1。类代码减少到 32 个，但添加了对分类标志的支持。</para>
            /// </summary>
            [Description("1.1")]
            [GPEnumValue("1.1")]
            value2,

            /// <summary>
            /// <para>1.2</para>
            /// <para>1.2—The output file version will be 1.2. Support for red-green-blue (RGB) color channels and GPS time was added.</para>
            /// <para>1.2 - 输出文件版本将为 1.2。添加了对红-绿-蓝 （RGB） 颜色通道和 GPS 时间的支持。</para>
            /// </summary>
            [Description("1.2")]
            [GPEnumValue("1.2")]
            value3,

            /// <summary>
            /// <para>1.3</para>
            /// <para>1.3—The output file version will be 1.3. Storage of lidar waveform data for point record formats that are not supported in the ArcGIS platform was added.</para>
            /// <para>1.3 - 输出文件版本将为 1.3。添加了 ArcGIS 平台不支持的点记录格式的激光雷达波形数据存储。</para>
            /// </summary>
            [Description("1.3")]
            [GPEnumValue("1.3")]
            value4,

            /// <summary>
            /// <para>1.4</para>
            /// <para>1.4— The output file version will be 1.4. Support for coordinate system definition using Well Known Text (WKT) convention, 256 class codes, up to 15 discrete returns per pulse, higher precision scan angle, and overlap classification flag was added.</para>
            /// <para>1.4— 输出文件版本将为 1.4。添加了使用已知文本 （WKT） 约定、256 个类代码、每个脉冲最多 15 个离散返回、更高精度的扫描角度和重叠分类标志支持坐标系定义。</para>
            /// </summary>
            [Description("1.4")]
            [GPEnumValue("1.4")]
            value5,

        }

        /// <summary>
        /// <para>Point Format</para>
        /// <para><xdoc>
        ///   <para>Specifies the point record format of the output .las files. The available options will vary based on the output LAS format file version.</para>
        ///   <bulletList>
        ///     <bullet_item>0—The base type for storing discrete LAS points that supports attributes such as lidar intensity, return values, scan angle, scan direction, and edge of flight line.</bullet_item><para/>
        ///     <bullet_item>1—GPS time is added to the attributes supported in point format 0.</bullet_item><para/>
        ///     <bullet_item>2—RGB values are added to the attributes supported in point format 0.</bullet_item><para/>
        ///     <bullet_item>3—RGB values and GPS time are added to the attributes supported in point format 0.</bullet_item><para/>
        ///     <bullet_item>6—The preferred base type for storing discrete LAS points in LAS file version 1.4.</bullet_item><para/>
        ///     <bullet_item>7—RGB values are added to the attributes supported in point format 6.</bullet_item><para/>
        ///     <bullet_item>8—RGB and near-infrared values are added to the attributes supported in point format 6.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定输出 .las 文件的点记录格式。可用选项将因输出 LAS 格式文件版本而异。</para>
        ///   <bulletList>
        ///     <bullet_item>0 - 用于存储离散 LAS 点的基本类型，支持激光雷达强度、返回值、扫描角度、扫描方向和飞行线边缘等属性。</bullet_item><para/>
        ///     <bullet_item>1 - GPS 时间将添加到点格式 0 支持的属性中。</bullet_item><para/>
        ///     <bullet_item>2 - RGB 值将添加到点格式 0 支持的属性中。</bullet_item><para/>
        ///     <bullet_item>3 - RGB 值和 GPS 时间将添加到点格式 0 支持的属性中。</bullet_item><para/>
        ///     <bullet_item>6 - 在 LAS 文件版本 1.4 中存储离散 LAS 点的首选基本类型。</bullet_item><para/>
        ///     <bullet_item>7 - 将 RGB 值添加到点格式 6 支持的属性中。</bullet_item><para/>
        ///     <bullet_item>8 - 将 RGB 和近红外值添加到点格式 6 支持的属性中。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Point Format")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _point_format_value? _point_format { get; set; } = null;

        public enum _point_format_value
        {
            /// <summary>
            /// <para>0</para>
            /// <para>0—The base type for storing discrete LAS points that supports attributes such as lidar intensity, return values, scan angle, scan direction, and edge of flight line.</para>
            /// <para>0 - 用于存储离散 LAS 点的基本类型，支持激光雷达强度、返回值、扫描角度、扫描方向和飞行线边缘等属性。</para>
            /// </summary>
            [Description("0")]
            [GPEnumValue("0")]
            _0,

            /// <summary>
            /// <para>1</para>
            /// <para>1—GPS time is added to the attributes supported in point format 0.</para>
            /// <para>1 - GPS 时间将添加到点格式 0 支持的属性中。</para>
            /// </summary>
            [Description("1")]
            [GPEnumValue("1")]
            _1,

            /// <summary>
            /// <para>2</para>
            /// <para>2—RGB values are added to the attributes supported in point format 0.</para>
            /// <para>2 - RGB 值将添加到点格式 0 支持的属性中。</para>
            /// </summary>
            [Description("2")]
            [GPEnumValue("2")]
            _2,

            /// <summary>
            /// <para>3</para>
            /// <para>3—RGB values and GPS time are added to the attributes supported in point format 0.</para>
            /// <para>3 - RGB 值和 GPS 时间将添加到点格式 0 支持的属性中。</para>
            /// </summary>
            [Description("3")]
            [GPEnumValue("3")]
            _3,

            /// <summary>
            /// <para>6</para>
            /// <para>6—The preferred base type for storing discrete LAS points in LAS file version 1.4.</para>
            /// <para>6 - 在 LAS 文件版本 1.4 中存储离散 LAS 点的首选基本类型。</para>
            /// </summary>
            [Description("6")]
            [GPEnumValue("6")]
            _6,

            /// <summary>
            /// <para>7</para>
            /// <para>7—RGB values are added to the attributes supported in point format 6.</para>
            /// <para>7 - 将 RGB 值添加到点格式 6 支持的属性中。</para>
            /// </summary>
            [Description("7")]
            [GPEnumValue("7")]
            _7,

            /// <summary>
            /// <para>8</para>
            /// <para>8—RGB and near-infrared values are added to the attributes supported in point format 6.</para>
            /// <para>8 - 将 RGB 和近红外值添加到点格式 6 支持的属性中。</para>
            /// </summary>
            [Description("8")]
            [GPEnumValue("8")]
            _8,

        }

        /// <summary>
        /// <para>Compression</para>
        /// <para><xdoc>
        ///   <para>Specifies whether the output .las file will be in a compressed format or the standard LAS format.</para>
        ///   <bulletList>
        ///     <bullet_item>No Compression—The output will be in the standard LAS format (*.las). This is the default.</bullet_item><para/>
        ///     <bullet_item>zLAS Compression—Output .las files will be compressed in the zLAS format (*.zlas).</bullet_item><para/>
        ///     <bullet_item>LAZ Compression—Output .las files will be compressed in the LAZ format (*.laz).</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定输出 .las 文件是压缩格式还是标准 LAS 格式。</para>
        ///   <bulletList>
        ///     <bullet_item>无压缩—输出将采用标准 LAS 格式 （*.las）。这是默认设置。</bullet_item><para/>
        ///     <bullet_item>zLAS 压缩—输出 .las 文件将以 zLAS 格式 （*.zlas） 进行压缩。</bullet_item><para/>
        ///     <bullet_item>LAZ 压缩 - 输出 .las 文件将以 LAZ 格式 （*.laz） 进行压缩。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Compression")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _compression_value _compression { get; set; } = _compression_value._NO_COMPRESSION;

        public enum _compression_value
        {
            /// <summary>
            /// <para>No Compression</para>
            /// <para>No Compression—The output will be in the standard LAS format (*.las). This is the default.</para>
            /// <para>无压缩—输出将采用标准 LAS 格式 （*.las）。这是默认设置。</para>
            /// </summary>
            [Description("No Compression")]
            [GPEnumValue("NO_COMPRESSION")]
            _NO_COMPRESSION,

            /// <summary>
            /// <para>zLAS Compression</para>
            /// <para>zLAS Compression—Output .las files will be compressed in the zLAS format (*.zlas).</para>
            /// <para>zLAS 压缩—输出 .las 文件将以 zLAS 格式 （*.zlas） 进行压缩。</para>
            /// </summary>
            [Description("zLAS Compression")]
            [GPEnumValue("ZLAS")]
            _ZLAS,

            /// <summary>
            /// <para>LAZ Compression</para>
            /// <para>LAZ Compression—Output .las files will be compressed in the LAZ format (*.laz).</para>
            /// <para>LAZ 压缩 - 输出 .las 文件将以 LAZ 格式 （*.laz） 进行压缩。</para>
            /// </summary>
            [Description("LAZ Compression")]
            [GPEnumValue("LAZ")]
            _LAZ,

        }

        /// <summary>
        /// <para>LAS Options</para>
        /// <para><xdoc>
        ///   <para>Specifies modifications that will be made to reduce the size of the output .las files and improve their usability and performance in display and analysis operations.</para>
        ///   <bulletList>
        ///     <bullet_item>Rearrange Points—Points will be rearranged to improve display and analysis performance. Statistics will be automatically computed during this process. This is the default.</bullet_item><para/>
        ///     <bullet_item>Remove Variable Length Records—Variable-length records that are added after the header as well as the points records of each file will be removed.</bullet_item><para/>
        ///     <bullet_item>Remove Extra Bytes—Extra bytes that may be present with each point from the input file will be removed.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定将进行的修改，以减小输出 .las 文件的大小，并提高其在显示和分析操作中的可用性和性能。</para>
        ///   <bulletList>
        ///     <bullet_item>重新排列点 - 将重新排列点以提高显示和分析性能。在此过程中，将自动计算统计数据。这是默认设置。</bullet_item><para/>
        ///     <bullet_item>移除可变长度记录 - 将移除在标题之后添加的可变长度记录以及每个文件的点记录。</bullet_item><para/>
        ///     <bullet_item>移除额外字节—将移除输入文件中每个点可能存在的额外字节。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("LAS Options")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public List<object> _las_options { get; set; } = null;


        /// <summary>
        /// <para>Output LAS Dataset</para>
        /// <para>The output LAS dataset referencing the newly created .las files.</para>
        /// <para>引用新创建的 .las 文件的输出 LAS 数据集。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output LAS Dataset")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _out_las_dataset { get; set; } = null;


        /// <summary>
        /// <para>Define Input Coordinate System</para>
        /// <para><xdoc>
        ///   <para>Specifies whether the spatial reference of input .las files will be defined by the Define Input Coordinate System parameter.</para>
        ///   <bulletList>
        ///     <bullet_item>No LAS Files—The spatial reference of input .las files will not be defined as an input argument. This is the default.</bullet_item><para/>
        ///     <bullet_item>All LAS Files—The spatial reference of input .las files will be defined as an input argument.</bullet_item><para/>
        ///     <bullet_item>LAS Files with No Spatial Reference—The spatial reference of input .las files that have no projection information in the header will be defined.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定是否由定义输入坐标系参数定义输入 .las 文件的空间参考。</para>
        ///   <bulletList>
        ///     <bullet_item>无 LAS 文件—输入 .las 文件的空间参考不会定义为输入参数。这是默认设置。</bullet_item><para/>
        ///     <bullet_item>所有 LAS 文件—输入 .las 文件的空间参考将被定义为输入参数。</bullet_item><para/>
        ///     <bullet_item>没有空间参考的 LAS 文件—将定义标题中没有投影信息的输入 .las 文件的空间参考。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Define Input Coordinate System")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _define_coordinate_system_value _define_coordinate_system { get; set; } = _define_coordinate_system_value._NO_FILES;

        public enum _define_coordinate_system_value
        {
            /// <summary>
            /// <para>No LAS Files</para>
            /// <para>No LAS Files—The spatial reference of input .las files will not be defined as an input argument. This is the default.</para>
            /// <para>无 LAS 文件—输入 .las 文件的空间参考不会定义为输入参数。这是默认设置。</para>
            /// </summary>
            [Description("No LAS Files")]
            [GPEnumValue("NO_FILES")]
            _NO_FILES,

            /// <summary>
            /// <para>All LAS Files</para>
            /// <para>All LAS Files—The spatial reference of input .las files will be defined as an input argument.</para>
            /// <para>所有 LAS 文件—输入 .las 文件的空间参考将被定义为输入参数。</para>
            /// </summary>
            [Description("All LAS Files")]
            [GPEnumValue("ALL_FILES")]
            _ALL_FILES,

            /// <summary>
            /// <para>LAS Files with No Spatial Reference</para>
            /// <para>LAS Files with No Spatial Reference—The spatial reference of input .las files that have no projection information in the header will be defined.</para>
            /// <para>没有空间参考的 LAS 文件—将定义标题中没有投影信息的输入 .las 文件的空间参考。</para>
            /// </summary>
            [Description("LAS Files with No Spatial Reference")]
            [GPEnumValue("FILES_MISSING_PROJECTION")]
            _FILES_MISSING_PROJECTION,

        }

        /// <summary>
        /// <para>Input Coordinate System</para>
        /// <para>The coordinate system that will be used to define the spatial reference of the input .las files. This parameter is only active if the Define Input Coordinate System parameter is set to All LAS Files or LAS Files with No Spatial Reference.</para>
        /// <para>将用于定义输入 .las 文件的空间参考的坐标系。仅当定义输入坐标系参数设置为所有 LAS 文件或无空间参考的 LAS 文件时，此参数才处于活动状态。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input Coordinate System")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _in_coordinate_system { get; set; } = null;


        public ConvertLas SetEnv(object scratchWorkspace = null, object workspace = null)
        {
            base.SetEnv(scratchWorkspace: scratchWorkspace, workspace: workspace);
            return this;
        }

    }

}